//
//  DetailViewController.m
//  08-homeWork-通讯录
//
//  Created by 402030900@qq.com on 16/7/25.
//  Copyright © 2016年 402030900@qq.com. All rights reserved.
//

#import "DetailViewController.h"

@interface DetailViewController ()
@property(nonatomic,strong)UITextField * textFiledName;
@property(nonatomic,strong)UITextField * textFiledAge;
@property(nonatomic,strong)UITextField * textFiledGender;
@property(nonatomic,strong)UITextField * textFiledTele;
@end

@implementation DetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    UILabel * labelName = [[UILabel alloc] initWithFrame:CGRectMake(100, 100, 100, 50)];
    labelName.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:labelName];
    _textFiledName = [[UITextField alloc] initWithFrame:CGRectMake(200, 100, 100, 50)];
    _textFiledName.backgroundColor = [UIColor greenColor];
    [self.view addSubview:_textFiledName];
    UILabel * labelAge = [[UILabel alloc] initWithFrame:CGRectMake(100, 200, 100, 50)];
    labelAge.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:labelAge];
     _textFiledAge = [[UITextField alloc] initWithFrame:CGRectMake(200, 200, 100, 50)];
    _textFiledAge.backgroundColor = [UIColor greenColor];
    [self.view addSubview:_textFiledAge];
    UILabel * labelGender = [[UILabel alloc] initWithFrame:CGRectMake(100, 300, 100, 50)];
    labelGender.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:labelGender];
    _textFiledGender = [[UITextField alloc] initWithFrame:CGRectMake(200, 300, 100, 50)];
    _textFiledGender.backgroundColor = [UIColor greenColor];
    [self.view addSubview:_textFiledGender];
    
    UILabel * labelTele = [[UILabel alloc] initWithFrame:CGRectMake(100, 400, 100, 50)];
    labelTele.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:labelTele];
    _textFiledTele = [[UITextField alloc] initWithFrame:CGRectMake(200, 400, 100, 50)];
    _textFiledTele.backgroundColor = [UIColor greenColor];
    [self.view addSubview:_textFiledTele];
    labelName.text = @"姓名";
    labelAge.text = @"年龄";
    labelGender.text = @"性别";
    labelTele.text = @"电话号码";
    labelName.textAlignment = NSTextAlignmentCenter;
    labelAge.textAlignment = NSTextAlignmentCenter;
    labelGender.textAlignment = NSTextAlignmentCenter;
    labelTele.textAlignment = NSTextAlignmentCenter;
    _textFiledName.text = _name;
    _textFiledAge.text = [NSString stringWithFormat:@"%@",self.age];// Number类型转化为NSString类型
    _textFiledGender.text = _gender;
    _textFiledTele.text = _tele;
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
